import ajax from '@/utils/ajax.js'
import store from '@/store/index.js'

// 新增收藏
export const addCommen = (data) => {
	return ajax({
		url: `/base/user/commen`,
		header: {
			authentication: store.getters.getUserInfo.token
		},
		data,
		method: "POST"
	})
}

// 通过订单号查询个人评论
export const queryCommen = (orderId) => {
	return ajax({
		url: `/base/user/commen/selectByOrderNumber?orderId=${orderId}`,
		header: {
			authentication: store.getters.getUserInfo.token
		},
	})
}

// 获取指定商品下的评价列表
export const getCommentList = () => {
	return ajax({
		url: '/base/user/commen/list',
		header: {
			authentication: store.getters.getUserInfo.token
		}
	})
}